package com.appspot.moviesessions.provider;

import android.net.Uri;
import android.provider.BaseColumns;

public class MovieSession {

	private static final String PATH_SEPARATOR = "/";
	public static final String AUTHORITY = "com.appspot.moviesessions.MovieSession";
	static final String MOVIE_DIR_PATH = "MOVIE";
	static final String SESSION_DIR_PATH = "SESSION";
	static final String LOCATION_DIR_PATH = "LOCATION";
	static final String MOVIE_PATH = MOVIE_DIR_PATH + PATH_SEPARATOR + "#";
	public static final String STR_MOVIE_DIR_URI = "content://" + AUTHORITY
			+ PATH_SEPARATOR + MOVIE_DIR_PATH;

	public static final String STR_LOCATION_DIR_URI = "content://" + AUTHORITY
			+ PATH_SEPARATOR + LOCATION_DIR_PATH;;
	public static final String STR_SESSION_DIR_URI = "content://" + AUTHORITY
			+ PATH_SEPARATOR + SESSION_DIR_PATH;

	public static final String STR_MOVIE_URI = "content://" + AUTHORITY
			+ PATH_SEPARATOR + MOVIE_DIR_PATH;

	public static final String FORMAT_MOVIE_INFO_URI = STR_MOVIE_DIR_URI
			+ "/%s";
	public static final String FORMAT_MOVIE_SESSION_URI = STR_SESSION_DIR_URI
			+ "/%s";;

	public static final Uri CONTENT_URI = Uri.parse(STR_MOVIE_DIR_URI);

	static final int DATABASE_VERSION = 30;
	static final String DATABASE_NAME = "movie-sessions2.db";
	static final String SESSION_DATA_URL = "http://10.0.2.2:8888/movies";

	// static final String SESSION_DATA_URL =
	// "http://movie-sessions.appspot.com/movies";

	public static class Movie implements BaseColumns {

		static final String TABLE = "Movie";
		public static final String NAME = "name";
		public static final String POSTER_URI = "poster_uri";

		static final String POSTER_THUMB_PATH_FORMAT = "%s.jpg";

		static final String POSTER_URI_FORMAT = "content://" + AUTHORITY
				+ "/poster/%s";

	}

	public static class Location implements BaseColumns {

		static final String TABLE = "Location";
		public static final String NAME = "name";
	}

	public static class Session implements BaseColumns {

		static final String TABLE = "Session";
		public static final String MOVIE = "movie";
		public static final String LOCATION = "location";
		public static final String TIME = "time";

	}
}
